package co.crossoft.mapper;

import co.crossoft.domain.CommonDialog;
import co.crossoft.domain.ResourceWorkCenter;
import co.crossoft.domain.WorkCenter;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository("workCenterMapper")
public interface WorkCenterMapper {

    /**
     * @param parMap
     * @return
     */
    public List<WorkCenter> selectByWorkCenter(Map parMap);

    /**
     * @param handle
     * @return
     */
    public List<WorkCenter> selectOneWorkCenterByHandle(String handle);

    /**
     * @param handle
     * @return
     */
    public int deleteByPrimaryKey(String handle);

    /**
     * @param workCenter
     * @return
     */
    public int addWorkCenter(WorkCenter workCenter);

    /**
     * @param workCenter
     * @return
     */
    public int updateWorkCenter(WorkCenter workCenter);

    /**
     * @param parMap
     * @return
     */
    public List<WorkCenter> workCenterIsExist(Map parMap);

    /**
     * @param commonDialogBean
     * @return
     */
    public List<CommonDialog> workCenterOrResourceSelect(CommonDialog commonDialogBean);

    /**
     * @param resourceWorkCenter
     */
    public void addWorkCenterRefResource(ResourceWorkCenter resourceWorkCenter);

    /**
     * @param handle
     */
    public void deleteWorkCenterRefResource(String handle);

    /**
     * @param workCenterFk
     * @return
     */
    public List<ResourceWorkCenter> selectResourceRefWorkCenter(String workCenterFk);

}